package supermarket;

import java.util.Date;

public class ProductPriceFactory {
	private Date stateDate;
	
	public ProductPriceFactory(){
		setStateDate(new Date());
	}
	public ProductPrice createProductPrice(String externalReference, Distributor distributor, Date stateDate, Date registrationTimestamp, float amount, Currency currency, float quantity, Unit unit,
			float unitPrice, Unit unitOfUnitPrice){
		return new ProductPrice(externalReference, distributor, stateDate, registrationTimestamp, amount, currency, quantity, unit,
				unitPrice, unitOfUnitPrice);
	}
	public ProductPrice createProductPrice(String externalReference, Distributor distributor, float amount, Currency currency, float quantity, Unit unit,
			float unitPrice, Unit unitOfUnitPrice){
		
		Date timestamp = new Date();
		
		return new ProductPrice(externalReference, distributor, getStateDate(), timestamp, amount, currency, quantity, unit,
				unitPrice, unitOfUnitPrice);
	}
	public ProductPrice createProductPrice(String externalReference, Distributor distributor, Date stateDate, float amount, Currency currency, float quantity, Unit unit,
			float unitPrice, Unit unitOfUnitPrice){
		
		Date timestamp = new Date();
		
		return new ProductPrice(externalReference, distributor, stateDate, timestamp, amount, currency, quantity, unit,
				unitPrice, unitOfUnitPrice);
	}
	
	public Date getStateDate() {
		return stateDate;
	}
	public void setStateDate(Date stateDate) {
		this.stateDate = stateDate;
	}
}
